package c05面向对象;

public class 抽象类与接口 {
	public static void main(String[] args) {
		Cc cc = new Cc("草泥马");
	}
}

class Ac {
}

interface Inter {
	public int i();

	//	public Inter(){}
//	int i;
//	private int i2=0;//错误！只能是public！
	public void method();

	//	protected void method2();//错误！只能是public！
//	private void method3();//错误！只能是public！
	void method4();//相当于public abstract method4();
}

abstract class Abs extends Ac implements Inter {

	public Abs() {
		System.err.println("AbstractClass");
	}

	public Abs(String s) {
		System.err.println(s);
	}

	public int i;//可以不用初始化！

	//	public abstract int i2;//变量不能带abstract关键字！
	public void a() {
	}

	public abstract void b();

	//	public void abstract b2();//错误！
//	public abstract static void c();//错误！！
//	public static abstract void d();//错误！！
	public static void main(char[][] args) {
		//TODO Auto-generated method stub

	}

}

abstract class Bc extends Abs {
}

class Cc extends Abs {

	public Cc(String s) {
		super(s);
	}

	@Override
	public int i() {
		//TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void b() {
		//TODO Auto-generated method stub

	}

	@Override
	public void method() {
		//TODO Auto-generated method stub

	}

	@Override
	public void method4() {
		//TODO Auto-generated method stub

	}
}

class Ic implements Inter {

	@Override
	public int i() {
		//TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void method() {
		//TODO Auto-generated method stub

	}

	@Override
	public void method4() {
		//TODO Auto-generated method stub

	}
}